﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FruitPicker.aspx.cs" Inherits="PickerControl.Pickers.FruitPicker" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
	<title>Select a fruit</title>
	<script type="text/javascript" >
		//<![CDATA[
		function setFruit(fruit) {
			var callbackName = '<%= Request.QueryString["callback"] %>';
			var callbackCallString = 'window.opener.' + callbackName + '("' + fruit + '");';
			
			eval(callbackCallString);
			close();
		}
		//]]>
	</script>
</head>
<body>
	<form id="fruitPickerForm" runat="server">
		<table cellpadding="0px" cellspacing="0px" border="0px">
			<tr><td><a href="#" onclick="setFruit('apple'); return false;">apple</a></td></tr>
			<tr><td><a href="#" onclick="setFruit('peach'); return false;">peach</a></td></tr>
			<tr><td><a href="#" onclick="setFruit('grapes'); return false;">grapes</a></td></tr>
		</table>
		<input type="hidden" id="hiddenField" />
	</form>
</body>
</html>
